home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / documents / RFC / rfc < prev    next >
Text File  |  1994-08-01  |  2KB  |  71 lines

  1. echo "   This script uses agrep, src for which is in ../../public/agrep"
  2. echo "\n"
  3. grepper='agrep -h -d$$ -i'
  4. oldIFS="$IFS"
  5. IFS=":$IFS"
  6. IFS="$oldIFS"
  7.  
  8. if [ -f /usr/people/4Dgifts/toolbox/documents/RFC/rfc-index.txt ]; then
  9.     RFC=/CDROM/documents/RFC
  10. fi
  11.  
  12. case "$RFC" in
  13. "")    echo "   Please set environment variable \"RFC\" to the current location"
  14.     echo "   of your RFC directory.  The Developer Toolbox CD is expecting"
  15.     echo "   this path to be \"/CDROM/documents/RFC\"."
  16.     echo "   To search in this directory using this \"rfc\" script, you will"
  17.     echo "   need to either umount the CD from wherever-it-is currently,"
  18.     echo "   then re-mount it under this mount point, or copy this 54+ MB "
  19.     echo "   dir to a local disk and then run"
  20.     echo "\n"
  21.     echo "setenv RFC \`pwd\`"
  22.     echo "\n"
  23.     echo "   after you cd to the local disk's directory location.  Then the"
  24.     echo "   \"rfc\" script will not bark at you.  An example of what it can"
  25.     echo "   produce wud be:"
  26.     echo "\n"
  27.     echo "< 118 ratmandu /documents/RFC> rfc 'protocol;multicast'"
  28.     echo "   This script uses agrep, src for which is in ../../public/agrep"
  29.            echo "\n"
  30.     echo "grepping..."
  31.     echo ""
  32.     echo "1458  Braudes, R.; Zabele, S.  Requirements for Multicast Protocols (Not"
  33.     echo "      online)  1993 May; 19 p. (Format: TXT=48107 bytes)"
  34.     echo ""
  35.     echo "1301  Armstrong, S.; Freier, A.; Marzullo, K.  Multicast Transport Protocol."
  36.     echo "      February 1992; 38 p. (Format: TXT=91977 bytes)"
  37.     echo ""
  38.     echo "1075  Waitzman, D.; Partridge, C.; Deering, S.  Distance Vector Multicast"
  39.     echo "      Routing Protocol.  1988 November; 24 p. (Format: TXT=54731 bytes)"
  40.     echo ""
  41.     echo "966   Deering, S.; Cheriton, D.  Host Groups: A Multicast Extension to the"
  42.     echo "      Internet Protocol.  1985 December; 27 p. (Format: TXT=61006 bytes)"
  43.     echo "      (Obsoleted by RFC 988)"
  44.     echo ""
  45.     exit
  46. esac
  47.  
  48. case "$1" in
  49. "")
  50.     echo 'usage: rfc <number>'
  51.     echo '       will display RFC <number> with "more" (or your $PAGER)'
  52.     echo ''
  53.     echo '       rfc <pattern>'
  54.     echo '       will egrep [agrep] for <pattern> in the file "rfc-index"'
  55.     echo ''
  56.     ;;
  57. [0-9]*)
  58.     list=
  59.     for i
  60.     do 
  61.         list="$list $RFC/rfc$i.*"
  62.     done
  63.     exec ${PAGER:-more} $list
  64.     ;;
  65. *)
  66.     echo grepping...
  67.     exec sed -e 's/^  *$//' $RFC/rfc-index.txt | $grepper "$@"
  68. esac
  69.  
  70.  
  71.